import RlButton from "./components/Button";
import RlIcon from "./components/Icon";
import RlCollapse from "./components/Collapse";
import RlContainer from "./components/Container";
import RlForm from "./components/Form";
import RlInput from "./components/Input";
import RlLink from "./components/Link";
import RlMessage from "./components/Message";
import RlMessageBox from "./components/MessageBox";
import RlRate from "./components/Rate";
import RlSelect from "./components/Select";
import RlSwitch from "./components/Switch";
import RlTooltip from "./components/Tooltip";
import { createMessage } from "./components/Message";

const components = [
  RlButton,
  RlIcon,
  RlCollapse,
  RlContainer,
  RlForm,
  RlInput,
  RlLink,
  RlMessage,
  RlMessageBox,
  RlRate,
  RlSelect,
  RlSwitch,
  RlTooltip
]
console.log(RlButton.render);

const install = (app: any)=> {
  // 遍历注册所有组件
  components.forEach((c)=>{
    app.component(c.name, c)
  })
}
export default {install}


export {
  RlButton,
  RlIcon,
  RlCollapse,
  RlContainer,
  RlForm,
  RlInput,
  RlLink,
  RlMessage,
  RlMessageBox,
  RlRate,
  RlSelect,
  RlSwitch,
  RlTooltip,
  createMessage
}